import {setServer} from "@/utils/axios";
const request = setServer('');

// 查询人员
export function getUserRoom(query) {
  return request({
    url: '/biotope/user/room/list',
    method: 'get',
    params: query
  })
}

// 获取人员详情
export function getUserRoomDetail(id) {
  return request({
    url: '/biotope/user/room/'+id,
    method: 'get',
  })
}

// 删除人员
export function deleteUserRoom(id) {
  return request({
    url: '/biotope/user/room/'+id,
    method: 'delete',
  })
}

// 重新上传照片
export function updatePhoto(query) {
  return request({
    url: '/biotope/user/room/change-photo',
    method: 'put',
    params: query
  })
}


// 解绑房间
export function unbindRoom(query) {
  return request({
    url: '/biotope/user/room/unbind-room',
    method: 'put',
    params: query
  })
}

// 导出
export function exportUserRoom(data,type){
  return request({
    url:'/biotope/user/room/download',
    method: 'post',
    params: data,
    responseType:type
  })
}

// 修改备注
export function changeRemark(query) {
  return request({
    url: '/biotope/user/room/change-remark',
    method: 'put',
    params: query
  })
}

export function auditUserRoom(query) {
  return request({
    url: '/biotope/user/room/audit',
    method: 'put',
    params: query
  })
}
